<?php
TImport('tourtype');
TImport('location');
ImportClass('weather');
$weathers    = ListWeather();
$tourtypes = ListTourType();


?>
<div class="Menutour">
    <div class="title"><?php echo __('Circuits touristiques organises')?></div>
    <div class="list">
        <?php 
        foreach($tourtypes as $tourtype){
            $url    = getLinkTourRoot($tourtype['iParentId']).'/'.$tourtype['cUrlString'];
        ?>
            <a href="<?php echoLink($url,true)?>"><?php echo $tourtype['cName']?></a>
        <?php }?>
    </div>
</div>

<div class="subscribe">
    <div class="title"><?php echo __('Subcribe')?></div>
    <div class="list">
        <form onsubmit="sendsubscribe();return false;">
            <input type="text" style="width: 135px;" id="subscribe" value="<?php __('votre email',true)?>" onfocus="this.value=''" />
            <input type="submit" value="OK" />
        </form>
        <?php echoScript('subscribe')?>
    </div>
</div>

<div class="searchtour">
    <div class="title"><?php echo __('Search')?></div>
    <div class="list">
        <form action="<?php echoLink('search',true)?>">
            <select name="location" style="width: 170px;">
                <option><?php __('All location',true)?></option>
                <?php echo ListLocationOption()?>
            </select>
            <select name="tourtype" style="width: 170px;">
                <option><?php __('All tour type',true)?></option>
                <?php foreach($tourtypes as $tourtype):?>
                <option value="<?php echo $tourtype['iId']?>"><?php echo $tourtype['cName']?></option>
                <?php endforeach?>
            </select>
            <input type="text" name="q" />
            <input type="submit" value="Search" />
        </form>
    </div>
</div>

<div class="support">
    <div class="title"><?php echo __('Support')?></div>
    <div class="list">
        <div align="center">
            <a href="skype:<?php echo getConfig('SkypeId')?>?chat"><img src="<?php echoLink('images/spskype.gif',true)?>"/></a>
            <a href="ymsgr:sendIM?<?php echo getConfig('YahooId')?>"><img src="<?php echoLink('images/spyahoo.gif',true)?>"/></a>
        </div>
        <div class="hotline"><?php echo __('Hotline')?></div>
        <div class="phone"><?php echo getConfig('Hotline')?></div>
        <div class="add">
            <?php echo getConfig('OtherPhone')?>
        </div>
        <div class="add">
        <?php echo __('Add')?>: <?php echo getConfig('Address')?><br />
        <?php
        $emails = getConfig('EmailContact');
        $emails = explode(',',$emails);
        foreach($emails as $email)
        {
            $email = trim($email);
        ?>
        <a href="mailto:<?php echo $email?>"><?php echo $email?></a> 
        <?php
        }
        ?>
        
        </div>
    </div>
</div>

<div class="weather">
    <div class="title"><?php __('weather',true)?></div>
    <div class="list">
        <table width="100%">
            <tr>
        <?php 
            foreach($weathers as $i=>$weather)
            {
            ?>
            
                <td align="center">
                    <?php echo $weather['cCityName']?><br />
                    <img src="<?php echoLink($weather['cImage'],true)?>" height="20"/>
                    <span class="do"><?php echo $weather['do']?></span>
                </td>
            
            <?php
                if(($i+1)%2==0 && $i>0)
                {
                    echo '</tr><tr>';
                }
            }
            ?>
            </tr>
        </table>
    </div>
</div>
<div align="center" style="padding-top: 5px;"><img src="<?php echoLink('images/share.gif',true)?>"></div>